package com.csmht.tododemo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.csmht.tododemo.pojo.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserMapper {

    @Select("select * from user where phone = #{phone}")
    User login(String phone);


    void insert(User user1);


    @Update("update user set role = #{role} where id = #{userId}")
    void updateAdmin(Long userId,Long role) ;




}

